package com.twu.biblioteca;

/**
 * Created by venus on 20/09/14.
 */
public class Movie implements ILibraryItem {

    public Movie(String name, String director, int year, int rating) {
        this.name = name;
        this.director= director;
        this.year=year;
        this.rating=rating;
    }

    private String name;
    private String director;
    private int year;
    private int rating;
    private boolean isAvailable = true;

    @Override
    public String getName() {return this.name;}

    @Override
    public boolean isAvailable() {
        return this.isAvailable;
    }

    @Override
    public void setAvailable(boolean isAvailable)
    {
        this.isAvailable = isAvailable;
    }

    public String getDirector() {return this.director;}

    public int getYear() {return this.year;}

    public int getRating() {return this.rating;}

    @Override
    public String provideDetails(){
        String movieDetails = "Name: " + this.getName() + " | Director: " + this.getDirector() + " | Year: " + this.getYear() + " | Rating: " + this.getRating();
        return movieDetails;
    }
}
